// Copyright (c) 2020 Presto Labs Pte. Ltd.
// Author: donggu

#pragma once
#include <memory>
#include <string>

#include "coin2/exchange/base/executor/archive_executor.h"
#include "coin2/exchange/base/executor/async_executor.h"
#include "coin2/exchange/base/executor/live_executor.h"
#include "coin2/exchange/base/market/market_exchange_api.h"
#include "coin2/exchange/base/order/processor.h"
#include "coin2/exchange/order/system.pb.h"
#include "coin2/feed/mgr/system.h"

namespace coin2::exchange::factory::order {

base::order::BaseOrderSubsystem* CreateOrderSystem(
    const std::string& name,
    const MarketExchangeApi& mea,
    const di::ConstantInjection& ci,
    const exchange::order::OrderSystemConfig& config,
    base::executor::LiveAsyncExecutor* live_exececutor,
    coin2::exchange::base::order::IOrderSubscriber* callback,
    coin2::exchange::base::order::GetProductHolderFunc func);

base::order::IOrderSubsystem* CreateSimOrderSystem(
    const std::string& name,
    const MarketExchangeApi& mea,
    const di::ConstantInjection& ci,
    const exchange::order::OrderSystemConfig& config,
    base::executor::ArchiveSyncExecutor* exec,
    coin2::feed::mgr::FeedSubsystemManager* fsm,
    base::order::IOrderSubscriber* callback,
    coin2::exchange::base::order::GetProductHolderFunc func);

}  // namespace coin2::exchange::factory::order
